require("./supports/env")
const path = require("path")

const server = require("./supports/server")
const dispatcherRoute = require("./main/DispatcherRoute").getInstance()


server.on("request", (req, res) => {
  dispatcherRoute.handleRequest(req, res)
})

server.on("listening", () => {
  dispatcherRoute.init(path.resolve(__dirname,"..", "src", "controller"))
})



server.listen(3800)
